export const formConf = {
  formRef: 'form',
  formModel: 'formData',
  labelPosition: 'right',
  labelWidth: 100,
  formRules: 'rules',
  disabled: false,
  span: 24,
  gutter: 15
}

export const inputComponents = [
  {
    __config__: {
      label: '单行文本',
      tag: 'el-input',
      tagIcon: 'input',
      defaultValue: '',
      layout: 'colFormItem',
      span: 24
    },
    placeholder: '请输入',
    style: {width: '100%'},
    maxLength: null,
    readonly: false,
    disabled: false,
    'show-word-limit': false
  },
  {
    __config__: {
      label: '多行文本',
      tag: 'el-input',
      tagIcon: 'textarea',
      defaultValue: '',
      layout: 'colFormItem',
      span: 24
    },
    type: 'textarea',
    placeholder: '请输入',
    autosize: {
      minRows: 3,
      maxRows: 4
    },
    style: {width: '100%'},
    maxLength: null,
    readonly: false,
    disabled: false,
    'show-word-limit': false
  },
  {
    __config__: {
      label: '下拉选择',
      tag: 'el-select',
      tagIcon: 'select',
      defaultValue: null,
      layout: 'colFormItem',
      span: 24
    },
    __slot__: {
      options: [
        {label: '选项1', value: 1},
        {label: '选项2', value: 2},
      ]
    },
    placeholder: '请选择',
    style: {width: '100%'},
    clearable: true,
    multiple: false,
    disabled: false,
    filterable: false
  },
]

export const actionComponents = [
  {
    __config__: {
      label: '按钮',
      tag: 'el-button',
      tagIcon: 'button',
      layout: 'nonFormItem',
      span: 24
    },
    __slot__: {
      default: '提交',
    },
    type: 'primary',
    disabled: false
  }
]

export const pageComponents = [
  {
    __config__: {
      label: '查询结果',
      tag: 'table-query',
      tagIcon: 'tableQuery',
      layout: 'nonFormItem',
      defaultValue: null
    },
    __slot__: {
      columns: [{prop: 'col1', label: 'Column 1'},{prop: 'col2', label: 'Column 2'}],
    }
  },
  {
    __config__: {
      label: '同行展示容器',
      tag: 'el-row',
      layout: 'rowFormItem',
      children: []
    },
    type: 'default',
    justify: 'start',
    align: 'top'
  }
]
